/**
 * Created by Cake on 2017/6/1.
 */

$(function () {
    $('.worker-edit').editWorker();
    $('.check-all').checkAll();

    var domSex = $('.sex');
    if (domSex.length > 0) {
        domSex.mobiscroll().select({
            theme: 'mobiscroll',
            mode: 'scroller',
            display: 'bottom',
            lang: 'zh',
            placeholder: '请选择性别',
            headerText:"性别",
            onInit: function() {
                domSex
                    .val('')
                    .prev().val('');
            }
        });
    }

    imgUpload('.add-picture input', function (src) {
        if ($('.add-picture img').attr('src') == '') {
            $('.add-picture img').show();
        } else {
            $('.add-picture img').hide();
        }
    });

});